<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0;" name="viewport" />
<title><?php echo C('SITE_INFO.name');?></title>
<script type="text/javascript" src="__PUBLIC__/scripts/jquery-1.7.2.min.js"></script>
<!-- <link href="__PUBLIC__/Catalog/css/common.css" rel="stylesheet" type="text/css" /> -->
<link href="__PUBLIC__/Catalog/css/styleSun.css" rel="stylesheet" type="text/css" media="screen">
<script type="text/javascript" src="__PUBLIC__/Catalog/js/jquery.js"></script>
<script type="text/javascript" src="__PUBLIC__/Catalog/js/slider.js"></script>

<!-- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title><?php echo C('SITE_INFO.name');?></title>
<script type="text/javascript" src="__PUBLIC__/scripts/jquery-1.7.2.min.js"></script>
<link href="__PUBLIC__/Catalog/css/common.css" rel="stylesheet" type="text/css" /> -->
</head>

<body>
<div id="master_address">
  <a href="javascript:HtmlAddress('深圳0')">[深圳0]</a><a href="javascript:HtmlAddress('深圳1')">[深圳1]</a><a href="javascript:HtmlAddress('深圳2')">[深圳2]</a><a href="javascript:HtmlAddress('深圳3')">[深圳3]</a><a href="javascript:HtmlAddress('深圳4')">[深圳4]</a><a href="javascript:HtmlAddress('深圳5')">[深圳5]</a><a href="javascript:HtmlAddress('深圳6')">[深圳6]</a><a href="javascript:HtmlAddress('深圳7')">[深圳7]</a><a href="javascript:HtmlAddress('深圳8')">[深圳8]</a><a href="javascript:HtmlAddress('深圳9')">[深圳9]</a></div>
<div id="master_top">
  <div class="top_address"><a href="javascript:ShowAddress();">[<?php echo ($cname); ?>]</a> v</div>
  <div class="top_logo"><img src="__PUBLIC__/Catalog/nimages/top_03.png" /></div>
  <div class="top_search"><a href="<?php echo U('Products/search');?>"><img src="__PUBLIC__/Catalog/nimages/top_06.png" /></a></div>
</div>

<script type="text/javascript">
$(function(){
	$('#master_flash').flexslider({
		animation: "slide",
		direction:"horizontal",
		easing:"swing",
		slideshowSpeed: 5000,
		animationDuration:600
	});
	$('#master_menu').flexslider({
		animation: "slide",
		direction:"horizontal",
		easing:"swing",
		slideshow: false,
		slideshowSpeed: 5000,
		animationDuration:600
	});
});
function ShowAddress(){
	if($("#master_address").css("display")=="none"){
	  $("#master_address").show();
	}else{
		$("#master_address").hide();
	}
}
function HtmlAddress(html){
	$(".top_address a").html("["+html+"]");
	$("#master_address").hide();
}
</script>
<div id="master_flash">
  <ul class="slides">
  	<?php if(is_array($banners)): foreach($banners as $key=>$vo): ?><li><img src="__PUBLIC__/images/banners/<?php echo ($vo["banner_image"]); ?>" /></li><?php endforeach; endif; ?>
  </ul>
</div>
<div id="master_menu">
   <ul class="slides">
   <li>
   <?php if(is_array($category)): foreach($category as $k=>$vo): ?><a href="<?php echo U('Products/index');?>?cid=<?php echo ($vo["categories_id"]); ?>">
   		 	<img src="__PUBLIC__/images/categories/<?php echo ($vo["categories_image"]); ?>" width="90" height="90" />
   		 	<span><?php echo ($vo["categories_name"]); ?></span>
   		 </a>
   		<?php if(($k+1)%10==0&&$k!=0):?></li><li> <?php endif; endforeach; endif; ?>
   </li>   </ul>
   <div class="clear"></div>
</div>
<div id="master_body">
  <div class="main_notice"><span>网站公告 |</span>
 	 <?php if(is_array($news)): foreach($news as $key=>$vo): ?><a href="<?php echo U('News/detail');?>?newsid=<?php echo ($vo["news_id"]); ?>"><strong>最新:</strong><?php echo (msubstr($vo["news_title"],0,20)); ?></a><?php endforeach; endif; ?>	  
  </div>
  <script type="text/javascript">
  $(document).ready(function(e) {
  	 var allnum = $(".main_notice a").size();
	 var bunum = allnum;
	 setInterval(function(){
	    flashnum(allnum,bunum);
		bunum = bunum - 1;
		if(bunum <= 0){
			bunum = allnum;
		}
	 },5000)
	 function flashnum(allnum,bunum){
		    $(".main_notice a").hide();
			$(".main_notice a").eq(bunum-1).fadeIn(500);
	 }
  });
  </script>
  <div class="main_top_box">
   <table>
    <tr>
     <td rowspan="2"><a href=""><img src="__PUBLIC__/Catalog/nimages/body_36.png" /></a></td>
     <td colspan="2"><a href=""><img src="__PUBLIC__/Catalog/nimages/body_38.png" /></a></td>
     </tr>
    <tr>
     <td><a href=""><img src="__PUBLIC__/Catalog/nimages/body_44.png" /></a></td>
     <td><a href=""><img src="__PUBLIC__/Catalog/nimages/body_46.png" /></a></td>
    </tr>
  </table>
  </div>
  <div class="main_fen_x">
    <img src="__PUBLIC__/Catalog/nimages/body_51.png" />
  </div>
  <div class="main_list">
    <ul>
    <?php if(is_array($productlist)): foreach($productlist as $key=>$vo): ?><li>
	    	<a href="<?php echo U('Products/detail');?>?pid=<?php echo ($vo["products_id"]); ?>"><img src="__PUBLIC__/images/products/thumb/s_<?php echo ($vo["products_image"]); ?>" /></a>
	    	<p class="m1"><?php echo ($vo["products_name"]); ?></p>
	    	<p class="m2">￥<?php echo ($vo["products_price"]); ?></p>
    	</li><?php endforeach; endif; ?>
    </ul>
    <div class="clear"></div>
  </div>
</div>
<!-- <link href="__PUBLIC__/Catalog/css/index.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div class="main">
   <div class="title">上品生活</div>
   <div class="banner"><a href="<?php echo U('Products/search');?>"><img src="__PUBLIC__/Catalog/images/banner.png" /></a></div>
   <div class="categrouy">
       <div class="uls">
           <ul>
              <?php if(is_array($category)): foreach($category as $key=>$vo): ?><li>
                 <dl>
                    <dd class="d1"><a href="<?php echo U('Products/index');?>?cid=<?php echo ($vo["categories_id"]); ?>"><img src="__PUBLIC__/images/categories/<?php echo ($vo["categories_image"]); ?>" /></a></dd>
                    <dd class="d2"><a href="<?php echo U('Products/index');?>?cid=<?php echo ($vo["categories_id"]); ?>"><?php echo ($vo["categories_name"]); ?></a></dd>
                 </dl>
              </li><?php endforeach; endif; ?>
           </ul>
       </div>
       
   </div>
   
   <div class="message">
		<ul>
		 <?php if(is_array($news)): foreach($news as $key=>$vo): ?><li><a href="<?php echo U('News/detail');?>?newsid=<?php echo ($vo["news_id"]); ?>"><strong>公告:</strong><?php echo (msubstr($vo["news_title"],0,20)); ?></a></li><?php endforeach; endif; ?>	 
		</ul>	    
   </div>
   <div class="products">
      <?php if(is_array($productlist)): foreach($productlist as $key=>$vo): ?><div class="products_list">
           <table>
                
                 <tr bordercolor="#FF0000">
                    <td style="width:80px; height:70px;">
                    	<a href="<?php echo U('Products/detail');?>?pid=<?php echo ($vo["products_id"]); ?>">
                    		<img src="__PUBLIC__/images/products/thumb/s_<?php echo ($vo["products_image"]); ?>" />
                    	</a>
                    </td>
                    <td style="width:190px; height:70px; padding-left: 5px;">
                        <dl class="dls">
                           <dt><a href="<?php echo U('Products/detail');?>?pid=<?php echo ($vo["products_id"]); ?>" style="font-size:18px; color:#000;"><?php echo ($vo["products_name"]); ?></a></dt>
                           <dd><a href="#" class="phone"><?php echo ($vo["contact_tel"]); ?>  <?php echo ($vo["contact_person"]); ?>&nbsp;成交量：<?php echo ($vo["showcount"]); ?></a></dd>
                           <dd><a href="#" class="dingwei"><?php echo ($vo["prov_name"]); ?>-<?php echo ($vo["city_name"]); ?></a></dd>
                           <dd><span class="time"><?php echo ($vo["products_date_added"]); ?></span> <span class="what"><?php echo ($vo["viewd"]); ?></span></dd>
                        </dl>
                    </td>
                    <td style="width:70px; height:70px;">
                           <p class="cc"><?php if($vo['up_flag'] == 1): ?><a href="#" class="ding"></a><?php endif; ?>
                           <?php if($vo['jiaji_flag'] == 1): ?><a href="#" class="ji"></a><?php endif; ?></p>
                    </td>
                </tr>
                
           </table>
       </div><?php endforeach; endif; ?>
   </div>
</div>
<script type="text/javascript"> 
	  function autoScroll(obj){  
			$(obj).find("ul").animate({  
				marginTop : "-39px"  
			},500,function(){  
				$(this).css({marginTop : "0px"}).find("li:first").appendTo(this);  
			})  
		}  
		$(function(){  
			setInterval('autoScroll(".message")',2000);
			  
		}) 
		
</script> 


 -->
 <div class="foot_height"></div>
<div id="master_foot">
  <a href="<?php echo U('Index/index');?>" class="cover"><img src="__PUBLIC__/Catalog/nimages/bottom_10.png" /><span>首页</span></a>
  <a href="<?php echo U('Products/index');?>"><img src="__PUBLIC__/Catalog/nimages/bottom_12.png" /><span>商品</span></a>
  <a href="<?php echo U('Mproducts/publish');?>"><img src="__PUBLIC__/Catalog/nimages/bottom_03.png" /><span>发布</span></a>
  <a href="<?php echo U('Membership/leaveword');?>"><img src="__PUBLIC__/Catalog/nimages/bottom_05.png" /><span>信息</span></a>
  <a href="<?php echo U('Membership/index');?>"><img src="__PUBLIC__/Catalog/nimages/bottom_07.png" /><span>我的</span></a>
</div>

</body>
</html>